package com.diaohw.module.auth;

import java.io.IOException;
import java.net.URL;

public class App {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        Class<?> clazz = Class.forName("com.xtck.platform.auth.controller.LoginController");
        URL url = clazz.getResource(clazz.getSimpleName() + ".class");
        // 将URL转换为文件路径（仅适用于文件系统）
        if (url != null && "file".equals(url.getProtocol())) {
            String path = url.getPath();
            System.out.println("Class file path: " + path);
        } else {
            System.out.println("Resource is not available as a file.");
        }
    }
}
